import {defHttp} from '/@/utils/http/axios';

enum Api {

  ordersDetail  = '/report/ordersDetail',
  usersDetail   = '/report/usersDetail',
  departsDetail = '/report/departsDetail',

  businessCustomer    = '/report/businessCustomer',
  businessCustomerRs  = '/report/businessCustomerRs',
  businessCustomerSkr = '/report/businessCustomerSkr',

  //导入导出
  businessCustomerExportXls   = '/businessCustomer/exportXls',
  businessCooperatorExportXls = '/businessCooperator/exportXls',

}

/**
 * 销售统计 
 * 
 */ 
export const ordersDetail = async (params) =>  {
  let result = await defHttp.get({url: Api.ordersDetail, params}, { isTransformResponse: false });
  return result
}

/**
 * 团队统计 
 * 
 */ 
export const usersDetail = async (params) =>  {
  let result = await defHttp.get({url: Api.usersDetail, params}, { isTransformResponse: false });
  return result
}

/**
 * 利润统计 
 * 
 */ 
export const departsDetail = async (params) =>  {
  let result = await defHttp.get({url: Api.departsDetail, params}, { isTransformResponse: false });
  return result
}

/**
 * 导出 -- 收款统计
 * @param params
 */
export const businessCustomerExportUrl = Api.businessCustomerExportXls;

/**
 * 导出 -- 付款统计
 */
export const businessCooperatorExportUrl = Api.businessCooperatorExportXls;

